<?php
namespace app\home\controller;
use app\home\controller\Base;

class Pages extends Base
{
    public function news()
    {
        $cateid=input('cateid');
        $data=db('article')->where('cateid',$cateid)->order('id desc')->paginate(8);
        $pagef=$data->render();
        $this->assign('article',$data);
        $this->assign('page', $pagef);
        return view();
    }

    public function thumb()
    {
        $cateid=input('cateid');
        $data=db('thumb')->where('cateid',$cateid)->order('id desc')->paginate(8);
        $pagef=$data->render();
        $this->assign('thumb',$data);
        $this->assign('page', $pagef);
        return view();
    }

    public function spage()
    {
        $cateid= input('cateid');
        $data=db('page')->where('cateid',$cateid)->find();
        $this->assign('page',$data);
        return view();
    }
}
